/*
 *Name:MyWindow
 *Author:wangyu
 *Descripter:This module controls the main window,include
 *              the menu,tools and dialog
 *Date:2012-05-30
 */

#ifndef MYWINDOW_H
#define MYWINDOW_H

#include <QMainWindow>
#include <QMenu>
#include <QAction>
#include <QToolBar>
#include <QFrame>
#include <QImage>

#include "addcontrol.h"

class MyWindow : public QMainWindow
{
    Q_OBJECT

public:
    MyWindow(QWidget *parent = 0);
    ~MyWindow();

    void createMenus();
    void createToolBars();

public slots:
    void aboutme();
    void aboutQtActTriggered();
    void createclient();
    void myoptions();

protected:
    void paintEvent(QPaintEvent *);
    void closeEvent(QCloseEvent *);

private:
    QMenu*      fileMenu;
    QMenu*      editMenu;
    QMenu*      helpMenu;

    QAction*    exitAct;
    QAction*    newAct;
    QAction*    optionAct;
    QAction*    aboutAct;
    QAction*    aboutQtAct;
    QAction*    new_w;
    QAction*    shutdown;

    QFrame*     myfra;
    QImage      img;

    QToolBar*   mainToolBar;

    AddControl* newclient;
};

#endif
